/*
 Navicat Premium Data Transfer

 Source Server         : localhost(root-root)
 Source Server Type    : MySQL
 Source Server Version : 50723
 Source Host           : localhost:3306
 Source Schema         : fakaGrace

 Target Server Type    : MySQL
 Target Server Version : 50723
 File Encoding         : 65001

 Date: 23/12/2021 01:31:29
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_config
-- ----------------------------
DROP TABLE IF EXISTS `t_config`;
CREATE TABLE `t_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) NOT NULL COMMENT '配置名称',
  `value` text NOT NULL COMMENT '配置内容',
  `tag` text COMMENT '网站备注，给开发者看的备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COMMENT='配置中心表';

-- ----------------------------
-- Records of t_config
-- ----------------------------
BEGIN;
INSERT INTO `t_config` VALUES (1, 'webname', '我是网站标题', '网站名称');
INSERT INTO `t_config` VALUES (2, 'weburl', 'http://www.fakagrace.ios/', '网站域名，支付回调可能会再次用到');
INSERT INTO `t_config` VALUES (3, 'keywords', '发卡系统,phpgrace,faka系统', '网站关键词');
INSERT INTO `t_config` VALUES (4, 'description', '网站描述33', '网站描述');
INSERT INTO `t_config` VALUES (5, 'adminemail', 'liukuaizhuan@qq.com', '用于客户发送问题给管理员的邮箱，对外公开的');
INSERT INTO `t_config` VALUES (6, 'copyright', 'copyright © 2021 Y-Admin all rights reserved', '版权信息');
INSERT INTO `t_config` VALUES (7, 'tongji', 'https://js.users.51.la/21232657.js', '统计脚本，用于网站数据统计的js脚本，常见51.la,站长之家，百度统计等');
INSERT INTO `t_config` VALUES (8, 'tpl', 'hyacinth', '网站前台模板');
INSERT INTO `t_config` VALUES (9, 'registerswitch', '1', '是否开放注册功能,1是开放,0是关闭');
INSERT INTO `t_config` VALUES (10, 'forgetpwdswitch', '1', '是否开启找回密码，1是开放,0是关闭');
INSERT INTO `t_config` VALUES (11, 'yzmswitch', '1', '是否开启验证码，1是开启，0是不开启验证码');
INSERT INTO `t_config` VALUES (12, 'backgroundimage', 'https://gss0.baidu.com/-fo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/6a600c338744ebf894c9e667dff9d72a6059a72a.jpg', '网站首页背景图片');
INSERT INTO `t_config` VALUES (13, 'notic', '首页静态顶部公告4', '首页静态顶部公告');
INSERT INTO `t_config` VALUES (14, 'layerad', '整站的弹窗公告4', '整站的弹窗公告');
COMMIT;

-- ----------------------------
-- Table structure for t_email
-- ----------------------------
DROP TABLE IF EXISTS `t_email`;
CREATE TABLE `t_email` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sender_mail` varchar(100) NOT NULL COMMENT '发件人_邮箱',
  `sender_name` varchar(50) NOT NULL COMMENT '发件人_昵称',
  `protocol` varchar(30) NOT NULL DEFAULT 'smtp' COMMENT '邮件发送协议',
  `host` varchar(100) NOT NULL COMMENT 'SMTP发送邮件服务端',
  `port` varchar(10) NOT NULL COMMENT 'SMTP端口号',
  `mail_address` varchar(255) NOT NULL COMMENT 'SMTP邮箱地址',
  `mail_password` varchar(255) NOT NULL COMMENT 'SMTP邮箱密码',
  `smtp_crypto` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'SMTP加密方式 0关，1ssl,2tls',
  `isactive` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0未激活 1激活',
  `isdelete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0未删除,1已删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of t_email
-- ----------------------------
BEGIN;
INSERT INTO `t_email` VALUES (1, 'xxxx@qq.com', '123', 'smtp', 'smtp.exmail.qq.com', '465', '111111@qq.com', '授权码', 0, 1, 0);
INSERT INTO `t_email` VALUES (2, 'xxxx2@qq.com', '3333', 'smtp', 'smtp.exmail.qq.com', '465', '1334343@qq.com', '授权码', 0, 0, 0);
INSERT INTO `t_email` VALUES (3, 'xxxxxx3@aliyun.com', '1111', 'smtp', 'smtp.exmail.qq.com', '465', '34343@aliyun.com', '11111', 0, 0, 0);
COMMIT;

-- ----------------------------
-- Table structure for t_manager_login_logs
-- ----------------------------
DROP TABLE IF EXISTS `t_manager_login_logs`;
CREATE TABLE `t_manager_login_logs` (
  `login_log_id` int(11) NOT NULL AUTO_INCREMENT,
  `login_log_email` varchar(50) NOT NULL DEFAULT '' COMMENT '管理员邮箱',
  `login_log_ip` varchar(15) CHARACTER SET utf8 NOT NULL COMMENT '登录ip',
  `login_log_time` int(11) NOT NULL COMMENT '登录时间',
  `login_log_type` smallint(2) DEFAULT NULL COMMENT '登录日志类型，1：用户名错误，2：密码错误，3：登录成功',
  PRIMARY KEY (`login_log_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=125 DEFAULT CHARSET=utf8mb4 COMMENT='管理员登录日志';

-- ----------------------------
-- Records of t_manager_login_logs
-- ----------------------------
BEGIN;
INSERT INTO `t_manager_login_logs` VALUES (1, '1', '0.0.0.0', 1638100347, 1);
COMMIT;

-- ----------------------------
-- Table structure for t_manager_menus
-- ----------------------------
DROP TABLE IF EXISTS `t_manager_menus`;
CREATE TABLE `t_manager_menus` (
  `mid` int(11) NOT NULL AUTO_INCREMENT COMMENT '菜单id',
  `pid` int(11) NOT NULL COMMENT '上级菜单',
  `ord` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  `title` varchar(30) NOT NULL COMMENT '菜单名称',
  `controller` varchar(30) NOT NULL COMMENT '菜单对应控制器名称',
  `method` varchar(30) NOT NULL COMMENT '菜单对应的方法名',
  `ishidden` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否隐藏，0正常显示，1隐藏',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '菜单状态，0 正常，1禁用',
  PRIMARY KEY (`mid`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COMMENT='菜单目录';

-- ----------------------------
-- Records of t_manager_menus
-- ----------------------------
BEGIN;
INSERT INTO `t_manager_menus` VALUES (1, 0, 0, '后台首页', 'index', 'index', 1, 0);
INSERT INTO `t_manager_menus` VALUES (2, 0, 1, '管理员管理', '', '', 0, 0);
INSERT INTO `t_manager_menus` VALUES (3, 0, 2, '权限管理', '', '', 0, 0);
INSERT INTO `t_manager_menus` VALUES (4, 3, 0, '菜单管理', 'menu', 'index', 0, 0);
INSERT INTO `t_manager_menus` VALUES (5, 3, 1, '角色管理', 'role', 'index', 0, 0);
INSERT INTO `t_manager_menus` VALUES (6, 2, 0, '管理员列表', 'manage', 'index', 0, 0);
INSERT INTO `t_manager_menus` VALUES (7, 4, 0, '菜单添加', 'menu', 'add', 1, 0);
INSERT INTO `t_manager_menus` VALUES (8, 5, 0, '角色添加', 'role', 'add', 1, 0);
INSERT INTO `t_manager_menus` VALUES (10, 0, 3, '设置中心', '', '', 0, 0);
INSERT INTO `t_manager_menus` VALUES (11, 10, 0, '配置中心', 'deploy', 'index', 0, 0);
INSERT INTO `t_manager_menus` VALUES (12, 10, 0, '邮箱配置', 'email', 'index', 0, 0);
INSERT INTO `t_manager_menus` VALUES (23, 1, 0, '欢迎页面', 'index', 'welcome', 0, 0);
INSERT INTO `t_manager_menus` VALUES (24, 2, 0, '管理员添加', 'manage', 'add', 1, 0);
INSERT INTO `t_manager_menus` VALUES (25, 5, 0, '角色删除', 'role', 'del', 0, 0);
INSERT INTO `t_manager_menus` VALUES (26, 4, 0, '菜单删除', 'menu', 'del', 1, 0);
INSERT INTO `t_manager_menus` VALUES (27, 2, 0, '管理员删除', 'manage', 'del', 1, 0);
INSERT INTO `t_manager_menus` VALUES (28, 2, 0, '管理员编辑', 'manage', 'edit', 1, 0);
INSERT INTO `t_manager_menus` VALUES (29, 4, 0, '菜单编辑', 'menu', 'edit', 1, 0);
INSERT INTO `t_manager_menus` VALUES (30, 5, 0, '角色编辑', 'role', 'edit', 1, 0);
INSERT INTO `t_manager_menus` VALUES (31, 1, 0, '系统', 'system', 'index', 0, 0);
INSERT INTO `t_manager_menus` VALUES (32, 12, 0, '邮箱添加', 'email', 'add', 1, 0);
INSERT INTO `t_manager_menus` VALUES (33, 12, 0, '邮箱编辑', 'email', 'edit', 1, 0);
INSERT INTO `t_manager_menus` VALUES (34, 12, 0, '邮箱删除', 'email', 'del', 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for t_manager_roles
-- ----------------------------
DROP TABLE IF EXISTS `t_manager_roles`;
CREATE TABLE `t_manager_roles` (
  `role_id` int(10) NOT NULL AUTO_INCREMENT,
  `role_name` varchar(40) DEFAULT NULL COMMENT '规则名称',
  `role_content` text COMMENT '规则内容',
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='权限角色表';

-- ----------------------------
-- Records of t_manager_roles
-- ----------------------------
BEGIN;
INSERT INTO `t_manager_roles` VALUES (1, '超级管理员', '[1,23,2,6,24,27,28,3,4,7,26,29,5,8,25,30,10,11,12,32,33,34]');
INSERT INTO `t_manager_roles` VALUES (2, '普通用户', '[1,23]');
INSERT INTO `t_manager_roles` VALUES (3, '会员管理', '[1,14,15]');
INSERT INTO `t_manager_roles` VALUES (4, '测试', '[1,23]');
COMMIT;

-- ----------------------------
-- Table structure for t_manager_user
-- ----------------------------
DROP TABLE IF EXISTS `t_manager_user`;
CREATE TABLE `t_manager_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `manager_uname` varchar(30) DEFAULT NULL COMMENT '昵称',
  `email` varchar(55) CHARACTER SET utf8 NOT NULL COMMENT '登录邮箱',
  `password` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '登录密码',
  `changetimes` tinyint(2) NOT NULL DEFAULT '0' COMMENT '修改邮箱的次数',
  `manager_login_time` int(11) NOT NULL COMMENT '登录时间',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  `manager_role_id` int(8) NOT NULL COMMENT '角色类型id',
  `manager_ip` varchar(30) NOT NULL COMMENT '登录ip',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态，默认：0正常启用，1禁用',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='后台管理员登录信息';

-- ----------------------------
-- Records of t_manager_user
-- 默认密码 123456
-- ----------------------------
BEGIN;
INSERT INTO `t_manager_user` VALUES (1, 'demo1', 'demo@demo.com', '14e1b600b1fd579f47433b88e8d852509130', 1, 1640090574, 1639110045, 1, '0.0.0.0', 0);
INSERT INTO `t_manager_user` VALUES (2, 'demo2', 'demo2@qq.com', '14e1b600b192fd579f47433b88e8d8529110', 1, 1639814747, 1638288788, 2, '0.0.0.0', 0);
INSERT INTO `t_manager_user` VALUES (3, 'demo3', 'demo3@ceshi.com', '14e1b600b1fd579f9447433b88e8d8529116', 0, 1639926742, 1639111263,3, '0.0.0.0', 0);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
